|
![](/i/fill.gif) |
Zeger Knaepen wrote:
> "Fernando G. del Cueto" wrote:
>> It looks as if it is in sync with the music.
>> If it is, how do you do it? It mustn't be trivial, I think.
>
> As far as I can see, only the flashes are in sync, which
> *is* more or less trivial to do :)
Nope, the movement of the thingy is in sync with the rythm too.
Here's the code that calculates the transform:
#declare Time = (frame_number-1)/25;
#declare Spline =
spline {
linear_spline
#declare Seed = seed(123);
#declare C = -1;
#while (C<=101)
C, <rand(Seed),rand(Seed),rand(Seed)>,
#declare C = C+1;
#end
}
// Create the movement
#declare MoveTimeTranslate = Time+0.3;
#declare MoveTimeRotate = Time+0.3;
#declare PulseTimeRotate =
MoveTimeRotate-sin(MoveTimeRotate*2*pi)*0.15;
#declare PulseTimeTranslate =
(MoveTimeTranslate-sin(MoveTimeTranslate*2*2*pi)*0.15)*2;
#declare Trans =
transform {
rotate <3,2,1>/12*360*PulseTimeRotate
translate (Spline(PulseTimeTranslate)*2-1)
}
You can see the movement clearer in this animation which features a ball
with no tentacles:
http://runevision.com/3d/anims/tentacleball_test.mpg
> nice animation btw!
Thanks! :)
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com **updated Jan 29**
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |